package com.ujs.servicemsm.controller;

import com.ujs.commonutils.constant.R;
import com.ujs.servicemsm.service.MailService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author zhangshihao
 * @create 2023-08-11 13:05
 */
@RestController
@RequestMapping("/edumsm/msm")
@Api(tags = "邮箱验证码")
public class MailController {
    @Autowired
    private MailService mailService;

    @ApiOperation("发送邮件验证码")
    @GetMapping("/sendCode/{to}")
    public R sendCode(@PathVariable("to") String to) {
        mailService.sendCode(to);
        return R.ok();
    }
}
